package com.lanchetech.dao;
import java.util.Collection;

import com.lanchetech.bean.request.PageReq;import com.lanchetech.entity.FlashSaleActivity;
import org.apache.ibatis.annotations.Mapper;import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

@Mapper
public interface FlashSaleActivityMapper {
    int deleteByPrimaryKey(Long id);

    int insert(FlashSaleActivity record);

    int insertSelective(FlashSaleActivity record);

    FlashSaleActivity selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(FlashSaleActivity record);

    int updateByPrimaryKey(FlashSaleActivity record);

    List<FlashSaleActivity> findAllPage(PageReq req);

    FlashSaleActivity findOneStarting();

    FlashSaleActivity findOneLatest();

    List<FlashSaleActivity> findAllToday();

    FlashSaleActivity findOneActive(@Param("id") Long id);

    int updateDeletedAndStatusById(@Param("updatedDeleted")Byte updatedDeleted,@Param("updatedStatus")Byte updatedStatus,@Param("id")Long id);

    List<FlashSaleActivity> findAllByIdIn(@Param("idCollection")Collection<Long> idCollection);

    List<FlashSaleActivity> findAllStartActivity(@Param("now") Date now);

}